#include "stdafx.h"
#include "detail/bmock_arg_checker.hpp"
#include "detail/bmock_message.hpp"

namespace bmock {
	bool arg_checker::check_arg(const std::string &name,const std::string &exp,const std::string &act) const {
		return tools_->check_equal(exp,act,message(ARG_VALUE,name),loc_);
	}

	bool arg_checker::check_ptr(const std::string &name,const bool null_expected,const bool null_supplied) const {
		return tools_->check_ptr(null_expected,null_supplied,message(ARG_PTR,name),loc_);
	}

	void arg_checker::update_failed(const std::string &name) const {
		tools_->error(message(ARG_UPDATE,name),loc_,false,false);
	}

	bool arg_checker::check_failed(const std::string &name) const {
		tools_->error(message(ARG_CHECK,name),loc_,false,false);
		return true;
	}

	bool arg_checker::check_arg_no_msg(const std::string &,const std::string &exp,const std::string &act) const {
		return tools_->check_equal_no_msg(exp,act,loc_);
	}

	bool arg_checker::check_ptr_no_msg(const std::string &,const bool null_expected,const bool null_supplied) const {
		return tools_->check_ptr_no_msg(null_expected,null_supplied,loc_);
	}
}